import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:reader_app/page_card/base_card.dart';

class CardShare extends BaseCard {
  @override
  _CardShareState createState() => _CardShareState();
}

class _CardShareState extends BaseCardState {
  @override
  Widget topTitle(String topTitle) {
    return super.topTitle("分享得联名卡");
  }

  @override
  Widget subTitle(String title) {
    return super.subTitle("分享给朋友可获得12天的无限卡");
  }

  @override
  Widget bottomContent() {
    return new Expanded(
        child: new Container(
      //Container 添加对齐方式之后也会改变它的布局约束，充满
      alignment: Alignment.center,
      decoration: new BoxDecoration(color: Color(0xffff6f7f9)),
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.end,
        children: <Widget>[
          new Expanded(
              child: Image.network(
            "https://www.devio.org/io/flutter_beauty/card_list.png",
            fit: BoxFit.cover,
          )),
          new Container(
            alignment: Alignment.center,
            child: new Padding(
              padding: EdgeInsets.only(bottom: 20, top: 10),
              child: bottomTitle("298364783人 参与活动"),
            ),
          )
        ],
      ),
    ));
  }

  @override
  Widget smallTopTitle(String smallTopTitle) {
    return super.smallTopTitle("/ 第19期");
  }
}
